import request from '@/utils/request'

export function getList(query) {
  return request({
    url: '/act/model/listPage',
    method: 'get',
    params: query
  })
}

export function saveOrUpdate(param) {
  return request.post('/act/model/saveOrUpdate', JSON.stringify(param))
}

export function deleteById(id) {
  return request({
    url: `/act/model/${id}`,
    method: 'delete'
  })
}

export function enable(id) {
  return request({
    url: `/act/model/enable/${id}`,
    method: 'Put'
  })
}

export function disable(id) {
  return request({
    url: `/eis/model/disable/${id}`,
    method: 'Put'
  })
}
